
package com.egene.tw.activity.member;

import com.egene.tw.R;

public enum MemberTab {
    MEMBER_CENTER(0,R.string.frame_title_member_home, MemberHomeFragment_.class),
    KNOW_YOURSELF(1, R.string.frame_title_know_yourself, KnowYourselfFragment_.class),
    CHECK_REPORT(2, R.string.frame_title_check_report, CheckReportFragment_.class),
    HEALTH(3,R.string.frame_title_health, HealthFragment_.class);
    
    private Class<?> clz;
    private int idx;
    private int title;

    private MemberTab(int idx, int title, Class<?> clz) {
        this.idx = idx;
        this.clz = clz;
        this.setTitle(title);
    }

    public static MemberTab getTabByIdx(int idx) {
        for (MemberTab t : values()) {
            if (t.getIdx() == idx)
                return t;
        }
        return MEMBER_CENTER;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getIdx() {
        return idx;
    }

    public void setIdx(int idx) {
        this.idx = idx;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

}
